/**
 * Copyright &copy; 2019-2022 <a href="https://gitee.com/rit/zx-pm">zx-pm</a> All rights reserved.
 */
package com.zx.pm.modules.zx.entity;

import org.hibernate.validator.constraints.Length;

import com.zx.pm.common.persistence.TreeEntity;

/**
 * 政府采购品目分类Entity
 * @author forest
 * @version 2019-01-04
 */
public class Cgml extends TreeEntity<Cgml> {
	
	private static final long serialVersionUID = 1L;
	private String code;		// 品目代码
	private String type;		// 采购类型
	
	public Cgml() {
		super();
	}

	public Cgml(String id){
		super(id);
	}

	@Length(min=1, max=100, message="品目代码长度必须介于 1 和 100 之间")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@Length(min=0, max=100, message="采购类型长度必须介于 0 和 100 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Cgml getParent() {
		return parent;
	}

	public void setParent(Cgml parent) {
		this.parent = parent;
	}
	
}